<template>
  <view class="innerContain">
        <view class="top-content">
           <view class="">
       <view class="date1">
     
        <text style=" font-size: 40rpx;font-weight: 600;margin:0 auto;margin-top:10rpx;color:#FFF">膨胀节日常点检记录表</text>
        <text class="border" @click="handleDate()">
               <image
          src="../../static/images/whitedate.png"
          @click="handleDate()"
          mode="aspectFit"
          style="height:36rpx;margin-top:10rpx;position: absolute;top: 12rpx;"
        />
<text style="margin:10rpx 8rpx 0rpx 50rpx ;">{{date}}</text>

        </text>
      </view>
    <u-calendar v-model="show" @change="timechange" mode="date"></u-calendar>
    
     
 
 <u-tabs  bar-height="1" :is-scroll="true" active-color="white" inactive-color="#eee" name="cate_name" :current="current" :list="datalist" id="titlechild" class="titlechild"  style="background:tr"  @change="change"></u-tabs>
 
       </view >
       
       </view> 
   <!-- <u-calendar v-model="show" :mode="mode" @change="change"></u-calendar> -->
        <view class=topradio>
      <view class="top">
  <view v-if="tableone">
       <u-loadmore :status="loadmore" :icon-type="iconType" :load-text="loadText" />
  </view>
  <view v-else>
 
    <table v-if="tableshow"   border="1" width="100%" cellspacing="0">
      <tr>
        <td colspan="2"> 设备名称</td>
        <td colspan="3"> {{form.name}}</td>
      </tr>
      <tr>
        <td colspan="2"> 型号规格</td>
        <td colspan="3"> {{form.code}}</td>
      </tr>
        <tr>
        <td colspan="2"> 设备编号</td>
        <td colspan="3"> {{form.sn}}</td>
      </tr>
         <tr>
        <td colspan="2"> 设备类别</td>
        <td colspan="3"> 暂无</td>
      </tr>
         <tr>
        <td colspan="2"> 使用单位</td>
        <td colspan="3"> 暂无</td>
      </tr>
      <tr>
        <th rowspan="3" style="width:55rpx">
          <view>序号</view>
        </th>
        <th rowspan="3" style="width:150rpx">
          <view>点检项目</view>
        </th>
        <th rowspan="3" style="width:150rpx">
          <view>内容</view>
        </th>
      </tr>
      <tr>
         <th colspan="2">
          <view>{{form.startTime}}</view>
        </th>
       
      </tr>
        <tr>
       <th >正常</th>
        <th>异常</th>
        </tr>
      <tr>
        <td :rowspan="5">1</td>
        <td :rowspan="5">波纹管</td>
        <td>裂纹</td>
        <td>
          <image v-show="this.form1[0].status =='正常'"  src="../../static/images/ok.png"  @click="handleCheck1()" />
        </td>
        <td>
          <image v-show="this.form1[0].status =='异常'"  src="../../static/images/error.png"  @click="handleCheck1()" />
        </td>
      </tr>
      <tr>
        <td>腐蚀</td>
        <td>
          <image  v-show="this.form1[1].status =='正常'" src="../../static/images/ok.png"  @click="handleCheck2()" />
        </td>
        <td>
          <image v-show="this.form1[1].status =='异常'" src="../../static/images/error.png"  @click="handleCheck2()" />
        </td>
      </tr>
      <tr>
        <td>泄露</td>
        <td>
          <image  v-show="this.form1[2].status =='正常'" src="../../static/images/ok.png"  @click="handleCheck3()" />
        </td>
        <td>
          <image v-show="this.form1[2].status =='异常'" src="../../static/images/error.png"  @click="handleCheck3()" />
        </td>
      </tr>
      <tr>
        <td>异常变形</td>
        <td>
          <image  v-show="this.form1[3].status =='正常'" src="../../static/images/ok.png"  @click="handleCheck4()" />
        </td>
        <td>
          <image v-show="this.form1[3].status =='异常'" src="../../static/images/error.png"  @click="handleCheck4()" />
        </td>
      </tr>
      <tr>
        <td>其他</td>
        <td>
          <image  v-show="this.form1[4].status =='正常'" src="../../static/images/ok.png"  @click="handleCheck5()" />
        </td>
        <td>
          <image v-show="this.form1[4].status =='异常'" src="../../static/images/error.png"  @click="handleCheck5()" />
        </td>
      </tr>
      <tr>
        <td :rowspan="3">2</td>
        <td :rowspan="3">承力承压件</td>
        <td>焊缝</td>
        <td>
          <image v-show="this.form2[0].status =='正常'" src="../../static/images/ok.png"  @click="handleCheck6()" />
        </td>
        <td>
          <image  v-show="this.form2[0].status =='异常'" src="../../static/images/error.png"  @click="handleCheck6()" />
        </td>
      </tr>
      <tr>
        <td>大变形</td>
        <td>
          <image v-show="this.form2[1].status =='正常'" src="../../static/images/ok.png"  @click="handleCheck7()" />
        </td>
        <td>
          <image  v-show="this.form2[1].status =='异常'" src="../../static/images/error.png"  @click="handleCheck7()" />
        </td>
      </tr>
      <tr>
        <td>其他</td>
        <td>
          <image v-show="this.form2[2].status =='正常'" src="../../static/images/ok.png"  @click="handleCheck8()" />
        </td>
        <td>
          <image v-show="this.form2[2].status =='异常'" src="../../static/images/error.png"  @click="handleCheck8()" />
        </td>
      </tr>
      <tr>
        <td :rowspan="3">3</td>
        <td :rowspan="3">附属件</td>
        <td>脱落</td>
        <td>
          <image v-show="this.form3[0].status =='正常'" src="../../static/images/ok.png"  @click="handleCheck9()" />
        </td>
        <td>
          <image v-show="this.form3[0].status =='异常'" src="../../static/images/error.png"  @click="handleCheck9()" />
        </td>
      </tr>
      <tr>
        <td>干涉</td>
        <td>
          <image v-show="this.form3[1].status =='正常'" src="../../static/images/ok.png"  @click="handleCheck10()" />
        </td>
        <td>
          <image v-show="this.form3[1].status =='异常'" src="../../static/images/error.png"  @click="handleCheck10()" />
        </td>
      </tr>
      <tr>
        <td>其他</td>
        <td>
          <image v-show="this.form3[2].status =='正常'" src="../../static/images/ok.png"  @click="handleCheck11()" />
        </td>
        <td>
          <image v-show="this.form3[2].status =='异常'" src="../../static/images/error.png"  @click="handleCheck11()" />
        </td>
      </tr>
      <tr>
        <td :rowspan="4">4</td>
        <td :rowspan="4">工况记录</td>
        <td>温度(℃)</td>
        <td>
             <text v-if="!this.form4[0].detail"   @click="handleCheck12()" >{{this.form4[0].status}}</text>
        <text v-else  @click="handleCheck12()" >{{this.form4[0].detail}}  </text>
        </td>
        <td>
          <image  v-show="this.form4[0].status =='异常'" src="../../static/images/error.png"  @click="handleCheck12()" />
           
        </td>
      </tr>
      <tr>
        <td>压力(MPa)</td>
        <td>
         <text v-if="!this.form4[1].detail"  @click="handleCheck13()">{{this.form4[0].status}}</text>
        <text v-else  @click="handleCheck13()">{{this.form4[1].detail}}</text>

        </td>
        <td>
          <image  v-show="this.form4[1].status =='异常'" src="../../static/images/error.png"  @click="handleCheck13()" />
        </td>
      </tr>
      <tr>
        <td>运行周期(次)</td>
        <td>
         <text v-if="!this.form4[2].detail"  @click="handleCheck14()" >{{this.form4[0].status}}  </text>
        <text v-else >{{this.form4[2].detail}} </text>
        </td>
        <td>
          <image v-show="this.form4[2].status =='异常'" src="../../static/images/error.png"  @click="handleCheck14()" />
       
        </td>
      </tr>
      <tr>
        <td>振动频率(HZ)</td>
        <td>
          <image v-show="this.form4[3].status =='正常'" src="../../static/images/ok.png"  @click="handleCheck15()" />
        </td>
        <td>
          <image v-show="this.form4[3].status =='异常'" src="../../static/images/error.png"  @click="handleCheck15()" />
        </td>
      </tr>
      <tr>
        <td colspan="3" id="rolename">点检人签字</td>
        <td colspan="3">
          {{form.nickName}} 
        </td>
      </tr>
    </table>



    <h3>点检异常记录</h3>

       <table border="1" width="100%" cellspacing="0" style="table-layout: fixed;">
            <tr>
              <th  style="width:18%"  rowspan="2">点检项目</th>
              <th colspan="3" >异常情况描述</th>
              <th  style="word-wrap:break-word;"  rowspan="2" >点检人</th>
            </tr>
            <tr>
              <th >内容</th>
              <th >异常</th>
              <th style="word-wrap:break-word;">描述</th>
            </tr>
        </table>


        <table v-if="descriptionVOS==null" border="1" width="100%" style="border-top: 0px solid;"  ref="boxtable" class="boxtable" cellspacing="0">
                  <tr>
                    <td>暂无异常记录</td>
                  </tr>
        </table>

        <table border="1" v-for="(items,index) in descriptionVOS" :key="index" width="100%" style="border-top: 0px;table-layout: fixed;"  ref="boxtable" class="boxtable" cellspacing="0">
            <tr v-if="index!='工况'">
              <td :rowspan="items.length*4" style="width:18%" class="tablewidth">{{items[0].type}}</td>
              <td   class="" style="padding: 0;border:0px;" >
                <table v-for="(item,index) in items" :key="index" border="1" style="table-layout: fixed;" width="100%"   frame=void cellspacing=0 cellpadding=0>
                  <tr>
                    <td colspan="1" rowspan="4" >{{item.item}}</td>
                    <td colspan="1" >检查件名称</td>
                    <td colspan="1" style="word-wrap:break-word;">{{item.name}}</td>
                    <td colspan="1" style="word-wrap:break-word;"  >{{form.nickName}}</td>
                  </tr>
                   <tr>
                    <td colspan="1" >位置</td>
                    <td colspan="1" style="width:180rpx;word-wrap:break-word;">{{item.address}}</td>
                    <td colspan="1" rowspan="3" style="width:100rpx;word-wrap:break-word;"  >           
                           <image :src="fileUrl+item.file" @click="handleImage(fileUrl+item.file)" />
                      </td>
                  </tr>
                  <tr>
                    <td colspan="1" >异常状况</td>
                    <td colspan="1" style="width:180rpx;word-wrap:break-word;">{{item.errmsg}}</td>
                  </tr>
                  <tr>
                    <td colspan="1" >数值记录</td>
                    <td colspan="1" style="width:180rpx;word-wrap:break-word;">{{item.value}}</td>
                  </tr>
              </table>
              </td>
            </tr>
              <tr v-else >
              <td :rowspan="items.length*4" style="width:18%" class="tablewidth">{{items[0].type}}</td>
              <td  class="" style="border:0px;padding:0" >
                <table v-for="(item,index) in items" :key="index" border="1"  width="100%" style="table-layout: fixed;"  frame=void cellspacing=0 cellpadding=0>
                  <tr>
                    <td colspan="1"   rowspan="4">{{item.item}}</td>
                    <td colspan="1" >检查件名称</td>
                    <td colspan="1"  style="word-wrap:break-word;">{{item.name}}</td>
                    <td colspan="1"  >{{form.nickName}}</td>
                  </tr>
                   <tr>
                    <td colspan="1" >位置</td>
                    <td colspan="1"  style="width:180rpx;word-wrap:break-word;">{{item.address}}</td>
                    <td colspan="1" rowspan="3"  style="width:100rpx" >           
                           <!-- <image :src="fileUrl+item.file" @click="handleImage(fileUrl+item.file)" /> -->
         <videoUpload v-model="item.file"/>
                     
                      </td>
                  </tr>
                  <tr>
                    <td colspan="1" >异常状况</td>
                    <td colspan="1"  style="width:180rpx;word-wrap:break-word;">{{item.errmsg}}</td>
                  </tr>
                  <tr>
                    <td colspan="1" >数值记录</td>
                    <td colspan="1"  style="width:180rpx;word-wrap:break-word;">{{item.value}}</td>
                  </tr>
              </table>
              </td>
            </tr>
              </table>


       
    <h3>点检排除记录</h3>
      <table border="1" width="100%" cellspacing="0" style="">
            <tr>
              <th  style="width:18%"  rowspan="2">点检项目</th>
              <th colspan="3" style="width:200rpx">修复内容</th>
              <th  style="width:120rpx"  rowspan="2" >点检人</th>
            </tr>
            <tr>
              <th style="width:100rpx">内容</th>
              <th >描述</th>
            </tr>
      </table> 
      <table v-if="taskDealVOS1.length==0" border="1" width="100%" style="border-top: 0px solid;"  ref="boxtable" class="boxtable" cellspacing="0">
                  <tr>
                    <td>暂无排除记录</td>
                  </tr>
       </table>



        <table border="1" v-for="(items2,index) in taskDealVOS1" :key="index" style="border-top: 0px;" width="100%" ref="boxtable" class="boxtable" cellspacing="0">
       
        <tr>
          <td  style="width:18%" rowspan='1' class="tablewidth" colspan='2'>{{items2[0].detailType}}</td>
            <td style="padding: 0;border:0px">
                <table v-for="(item3,index) in items2" :key="index" border="1"  width="100%"   frame=void cellspacing=0 cellpadding=0>
     
        <tr>
        <td  style="border:0px" >
     <table border="1"  v-if="item3.way == '数据保存'"  width="100%"   frame=void style="border-spacing:0;   " >
                      <tr >
                        <td style="width:100rpx">{{item3.item}}</td>
                        <td>数据保存</td>
                        <td  style="width:120rpx"  >{{form.nickName}}</td>
                      </tr>
                    </table>
         <table border="1"  v-if=" item3.way == '内部判断' && item3.type == '设备更换' "  width="100%"   frame=void style=" border-spacing:0;   " >
                      <tr >
                        <td style="width:100rpx" rowspan="5">{{item3.item}}</td>
                        <td colspan="2">内部判断——设备更换</td>
                        <td style="width:120rpx"   rowspan="5" >{{form.nickName}}</td>
                      </tr>
                      <tr>
                        <td>更换时间</td>
                        <td>{{item3.replaceTime}}</td>
                      </tr>
                       <tr>
                        <td>制造单位</td>
                        <td>{{item3.makeUnit}}</td>
                      </tr>
                       <tr>
                        <td>更换原因</td>
                        <td>{{item3.replaceReason}}</td>
                      </tr>
                       <tr>
                        <td>设备代号</td>
                        <td>{{item3.sn}}</td>
                      </tr>
                    </table> 
                     <table border="1"   v-if=" item3.way == '内部判断' && item3.type == '设备修复' " width="100%"   frame=void style=" border-spacing:0;   " >
                      <tr >
                        <td style="width:100rpx" rowspan="5">{{item3.item}}</td>
                        <td colspan="2">内部判断——设备修复</td>
                        <td style="width:120rpx"   rowspan="5" >{{form.nickName}}</td>
                      </tr>
                      <tr>
                        <td>更换时间</td>
                        <td>{{item3.replaceTime}}</td>
                      </tr>
                       <tr>
                        <td>修复部门</td>
                        <td>{{item3.repairDept}}</td>
                      </tr>
                       <tr>
                        <td>修复方法</td>
                        <td>{{item3.repairWay}}</td>
                      </tr>
                       <tr>
                        <td>拍照记录</td>
                        <td>   <image :src="fileUrl+item3.photoRecord" @click="handleImage(fileUrl+item3.photoRecord)" /></td>
                      </tr>
                    </table>
                    
                      <table border="1"  v-if=" item3.way == '内部判断' && item3.type == '继续使用' "  width="100%"   frame=void style=" border-spacing:0;   " >
                      <tr >
                        <td style="width:100rpx">{{item3.item}}</td>
                        <td>内部判断——继续使用</td>
                        <td  style="width:120rpx"   >{{form.nickName}}</td>
                      </tr>
                    </table>
                      <table border="1"  v-if=" item3.way == '平台发送厂家' && item3.type == '报废与更换' "  width="100%"   frame=void style=" border-spacing:0;   " >
                             <tr >
                               <td style="width:100rpx" rowspan="5">{{item3.item}}</td>
                               <td colspan="2">平台发送厂家——报废与更换</td>
                               <td style="width:120rpx"  rowspan="5" >{{form.nickName}}</td>
                             </tr>
                             <tr>
                               <td>更换时间</td>
                               <td>{{item3.replaceTime}}</td>
                             </tr>
                              <tr>
                               <td>制造单位</td>
                               <td>{{item3.makeUnit}}</td>
                             </tr>
                              <tr>
                               <td>更换原因</td>
                               <td>{{item3.replaceReason}}</td>
                             </tr>
                              <tr>
                               <td>设备代号</td>
                               <td> {{item3.sn}}</td>
                             </tr>
                            </table>
                              <table border="1"  v-if=" item3.way == '平台发送厂家' && item3.type == '修复' && item3.typeMsg == '返厂维修' " width="100%"   frame=void style="border-spacing:0;" >
                      <tr >
                        <td style="width:100rpx" rowspan="5">{{item3.item}}</td>
                        <td colspan="2">平台发送厂家——返厂维修</td>
                        <td style="width:120rpx"   rowspan="5" >{{form.nickName}}</td>
                      </tr>
                      <tr>
                        <td>更换时间</td>
                        <td>{{item3.replaceTime}}</td>
                      </tr>
                       <tr>
                        <td>修复单位</td>
                        <td>{{item3.repairDept}}</td>
                      </tr>
                       <tr>
                        <td>修复方法</td>
                        <td>{{item3.repairWay}}</td>
                      </tr>
                       <tr>
                        <td>拍照记录</td>
                        <td>   <image :src="fileUrl+item3.photoRecord" @click="handleImage(fileUrl+item3.photoRecord)" /></td>
                      </tr>
                    </table>
                      
                     <table border="1" v-if=" item3.way == '平台发送厂家' && item3.type == '修复' && item3.typeMsg == '现场维修' "  width="100%"   frame=void style=" border-spacing:0;   " >
                      <tr >
                        <td style="width:100rpx" rowspan="5">{{item3.item}}</td>
                        <td colspan="2">平台发送厂家——现场维修</td>
                        <td style="width:120rpx"   rowspan="5" >{{form.nickName}}</td>
                      </tr>
                      <tr>
                        <td>更换时间</td>
                        <td>{{item3.replaceTime}}</td>
                      </tr>
                       <tr>
                        <td>修复单位</td>
                        <td>{{item3.repairDept}}</td>
                      </tr>
                       <tr>
                        <td>修复方法</td>
                        <td>{{item3.repairWay}}</td>
                      </tr>
                       <tr>
                        <td>拍照记录</td>
                        <td>   <image :src="fileUrl+item3.photoRecord" @click="handleImage(fileUrl+item3.photoRecord)" /></td>
                      </tr>
                    </table>
                     <table border="1"  v-if=" item3.way == '平台发送厂家' && item3.type == '继续使用' "   width="100%"   frame=void style=" border-spacing:0;   " >
                      <tr >
                        <td style="width:100rpx">{{item3.item}}</td>
                        <td>平台发送厂家——继续使用</td>
                        <td style="width:120rpx"  >{{form.nickName}}</td>
                      </tr>
                    </table>
                  </td>
                </tr>
                      </table>
            </td>
        </tr>
              </table> 
  </view>
              <view style="height:20rpx"></view>
              </view>
              </view>
              </view>
</template>

<script>
import { pointCheckTaskDeviceCreateReport } from "@/api/index.js";
export default {
  onLoad(val) {
    this.id = val.id;
    uni.showLoading({
      title: "加载中"
    });
    this.timeone = val.timeone;
    this.hour = val.hour;
    this.minute = val.minute;
    this.second = val.second;
    this.hourarr = this.hour + ":" + this.minute + ":" + this.second;
  },
  onShow() {
    // setTimeout(() => {
    //   var that = this;
    //   uni.getSystemInfo({
    //     success(res) {
    //       document.getElementById("titlechild");
    //     }
    //   });
    // }, 500);
    this.getList();
    this.date = this.timeone;
    this.current = 0;
    uni.hideLoading();
  },
  data() {
    return {
      iconType: "flower",
      show: true,
      loadmore: "暂无数据",
      loadText: {
        loadmore: "暂无数据",
        loading: "努力加载中",
        nomore: "没有更多数据",
        data: "暂无数据"
      },
      mode: "date",
      show: false,
      date: "",
      height: 0,
      height2: 0,
      height3: 0,
      height4: 0,
      height5: 0,
      height6: 0,
      height7: 0,
      image: "../../static/images/1.jpg",
      form: {},
      form1: [{}, {}, {}, {}, {}],
      form2: [{}, {}, {}],
      form3: [{}, {}, {}],
      form4: [{}, {}, {}, {}],
      form5: {},
      descriptionVOS: [],
      taskDealVOS: [],
      taskDealVOS1: [],
      descriptionVOS1: [],
      tableone: false,
      list: [
        {
          number: 1,
          name: "波纹管",
          content: [
            {
              value: "裂纹",
              checked: "'false'"
            },
            {
              value: "腐蚀",
              checked: "'false'"
            },
            {
              value: "泄露",
              checked: "'false'"
            },
            {
              value: "异常变形",
              checked: "'false'"
            },
            {
              value: "其他问题",
              checked: "'false'"
            }
          ]
        },
        {
          number: 2,
          name: "承力承受件",
          content: [
            {
              value: "焊缝",
              checked: "'false'"
            },
            {
              value: "大变形",
              checked: "'false'"
            },
            {
              value: "其他问题",
              checked: "'false'"
            }
          ]
        },
        {
          number: 3,
          name: "附属件",
          content: [
            {
              value: "脱落",
              checked: "'false'"
            },
            {
              value: "干涉",
              checked: "'false'"
            },
            {
              value: "其他问题",
              checked: "'false'"
            }
          ]
        },
        {
          number: 4,
          name: "工况记录",
          content: [
            {
              value: "温度(℃)",
              checked: "'false'"
            },
            {
              value: "压力(MPa)",
              checked: "'false'"
            },
            {
              value: "运行周期(次)",
              checked: "'false'"
            },
            {
              value: "振动频率(HZ)",
              checked: "'false'"
            }
          ]
        }
      ],
      datalist: [],
      hourarr: "",
      current: 0,
      tableshow: false
    };
  },
  methods: {
    handleDate() {
      this.show = true;
      // uni.navigateTo({
      //   url: "/pages/preview/date"
      // });
    },
    getList() {
      uni.showLoading({
        title: "加载中"
      });

      this.tableshow = false;
      this.form = {};
      this.form1 = {};
      this.form2 = {};
      this.form3 = {};
      this.form4 = {};
      this.form5 = {};
      this.datalist = [];
      const data = {
        id: this.id,
        startTime: this.timeone
      };
      if (!this.hourarr) {
        console.log(data)
        pointCheckTaskDeviceCreateReport(data).then(res => {
          // console.log(res)
          res.data.forEach(item => {
            this.datalist.push({ cate_name: item.startTime.split(" ")[1] });
          });

          if (res.data.length == 0) {
            this.tableone = true;
          } else {
            this.tableone = false;
                   console.log(res.data)
            this.form = res.data[0];
            console.log(this.form)
       if(this.form.checkItemMap== null){
         this.tableone=true
         this.current=0
       }else {
         
            this.form.checkItemMap["波纹管"].forEach(item => {
              if (item.item == "裂纹") {
                this.form1[0] = item;
                this.form1[0].id = item.id;
                this.form1[0].id = item.id;
              } else if (item.item == "腐蚀") {
                this.form1[1] = item;
                this.form1[1].id = item.id;
                this.form1[1].Tdata = item.taskDeviceId;
              } else if (item.item == "泄露") {
                this.form1[2] = item;
                this.form1[2].id = item.id;
                this.form1[2].Tdata = item.taskDeviceId;
              } else if (item.item == "异常变形") {
                this.form1[3] = item;
                this.form1[3].id = item.id;
                this.form1[3].Tdata = item.taskDeviceId;
              } else if (item.item == "其他") {
                this.form1[4] = item;
                this.form1[4].id = item.id;
                this.form1[4].Tdata = item.taskDeviceId;
              }
            });
            this.form.checkItemMap["承力承压件"].forEach(item => {
              if (item.item == "焊缝") {
                this.form2[0] = item;
                this.form2[0].id = item.id;
                this.form2[0].Tdata = item.taskDeviceId;
              } else if (item.item == "大变形") {
                this.form2[1] = item;
                this.form2[1].id = item.id;
                this.form2[1].Tdata = item.taskDeviceId;
              } else if (item.item == "其他") {
                this.form2[2] = item;
                this.form2[2].id = item.id;
                this.form2[2].Tdata = item.taskDeviceId;
              }
            });
            this.form.checkItemMap["附属件"].forEach(item => {
              if (item.item == "脱落") {
                this.form3[0] = item;
                this.form3[0].id = item.id;
                this.form3[0].Tdata = item.taskDeviceId;
              } else if (item.item == "干涉") {
                this.form3[1] = item;
                this.form3[1].id = item.id;
                this.form3[1].Tdata = item.taskDeviceId;
              } else if (item.item == "其他") {
                this.form3[2] = item;
                this.form3[2].id = item.id;
                this.form3[2].Tdata = item.taskDeviceId;
              }
            });
            this.form.checkItemMap["工况"].forEach(item => {
              if (item.item == "温度") {
                this.form4[0] = item;
                this.form4[0].id = item.id;
                this.form4[0].Tdata = item.taskDeviceId;
              } else if (item.item == "压力") {
                this.form4[1] = item;
                this.form4[1].id = item.id;
                this.form4[1].Tdata = item.taskDeviceId;
              } else if (item.item == "运行周期") {
                this.form4[2] = item;
                this.form4[2].id = item.id;
                this.form4[2].Tdata = item.taskDeviceId;
              } else if (item.item == "振动") {
                this.form4[3] = item;
                this.form4[3].id = item.id;
                this.form4[3].Tdata = item.taskDeviceId;
              }
            });
            this.descriptionVOS = [];
            this.descriptionVOS = this.form.descriptionVOS;
            for (var i in this.descriptionVOS) {
              this.descriptionVOS1.push(this.taskDealVOS[i]);
            }
            this.taskDealVOS = this.form.taskDealVOS;
            this.taskDealVOS1 = [];
            for (var i in this.taskDealVOS) {
              this.taskDealVOS1.push(this.taskDealVOS[i]);
            }
       }
          }
          uni.hideLoading();
          this.tableshow = true;
        });
        uni.hideLoading();
      } else {
   console.log(data)
this.tableone = false;
        this.form = {};
        this.datalist = [];
        pointCheckTaskDeviceCreateReport(data).then(res => {
   console.log(res)

          res.data.forEach(item => {
            this.datalist.push({ cate_name: item.startTime.split(" ")[1] });
            for (let a = 0; a < this.datalist.length; a++) {
              if (this.datalist[a].cate_name == this.hourarr) {
                this.current = a;
              }
            }
            const time = this.timeone + " " + this.hourarr;
            if (item.startTime == time) {
              this.form = item;
            }
                  //  console.log(  this.form )
          });
          if (this.form.checkItemMap) {
            this.form.checkItemMap["波纹管"].forEach(item => {
              if (item.item == "裂纹") {
                this.form1[0] = item;
                this.form1[0].id = item.id;
                this.form1[0].Tdata = item.taskDeviceId;
              } else if (item.item == "腐蚀") {
                this.form1[1] = item;
                this.form1[1].id = item.id;
                this.form1[1].Tdata = item.taskDeviceId;
              } else if (item.item == "泄露") {
                this.form1[2] = item;
                this.form1[2].id = item.id;
                this.form1[2].Tdata = item.taskDeviceId;
              } else if (item.item == "异常变形") {
                this.form1[3] = item;
                this.form1[3].id = item.id;
                this.form1[3].Tdata = item.taskDeviceId;
              } else if (item.item == "其他") {
                this.form1[4] = item;
                this.form1[4].id = item.id;
                this.form1[4].Tdata = item.taskDeviceId;
              }
            });
            this.form.checkItemMap["承力承压件"].forEach(item => {
              if (item.item == "焊缝") {
                this.form2[0] = item;
                this.form2[0].id = item.id;
                this.form2[0].Tdata = item.taskDeviceId;
              } else if (item.item == "大变形") {
                this.form2[1] = item;
                this.form2[1].id = item.id;
                this.form2[1].Tdata = item.taskDeviceId;
              } else if (item.item == "其他") {
                this.form2[2] = item;
                this.form2[2].id = item.id;
                this.form2[2].Tdata = item.taskDeviceId;
              }
            });
            this.form.checkItemMap["附属件"].forEach(item => {
              if (item.item == "脱落") {
                this.form3[0] = item;
                this.form3[0].id = item.id;
                this.form3[0].Tdata = item.taskDeviceId;
              } else if (item.item == "干涉") {
                this.form3[1] = item;
                this.form3[1].id = item.id;
                this.form3[1].Tdata = item.taskDeviceId;
              } else if (item.item == "其他") {
                this.form3[2] = item;
                this.form3[2].id = item.id;
                this.form3[2].Tdata = item.taskDeviceId;
              }
            });
            this.form.checkItemMap["工况"].forEach(item => {
              if (item.item == "温度") {
                this.form4[0] = item;
                this.form4[0].id = item.id;
                this.form4[0].Tdata = item.taskDeviceId;
              } else if (item.item == "压力") {
                this.form4[1] = item;
                this.form4[1].id = item.id;
                this.form4[1].Tdata = item.taskDeviceId;
              } else if (item.item == "运行周期") {
                this.form4[2] = item;
                this.form4[2].id = item.id;
                this.form4[2].Tdata = item.taskDeviceId;
              } else if (item.item == "振动") {
                this.form4[3] = item;
                this.form4[3].id = item.id;
                this.form4[3].Tdata = item.taskDeviceId;
              }
            });
            this.tableshow = true;

            this.descriptionVOS = [];
            this.descriptionVOS = this.form.descriptionVOS;
            for (var i in this.descriptionVOS) {
              this.descriptionVOS1.push(this.taskDealVOS[i]);
            }
            this.taskDealVOS = this.form.taskDealVOS;
            this.taskDealVOS1 = [];
            for (var i in this.taskDealVOS) {
              this.taskDealVOS1.push(this.taskDealVOS[i]);
            }
            uni.hideLoading();
          } else {
            this.tableone = true;
            uni.hideLoading();
          }
          this.tableshow = true;
        });
        uni.hideLoading();
      }
    },
    handleImage(e) {
      var images = [];
      images.push(e);
      uni.previewImage({
        current: 0,
        urls: images,
        longPressActions: {
          itemList: ["保存图片"],
          success: data => {
            uni.saveImageToPhotosAlbum({
              //保存图片到相册
              filePath: payUrl,
              success: function() {
                uni.showToast({ icon: "success", title: "保存成功" });
              },
              fail: err => {
                uni.showToast({ icon: "none", title: "保存失败，请重新尝试" });
              }
            });
          },
          fail: function(err) {}
        }
      });
    },
    // 选日期
    timechange(e) {
      this.date = e.result;
      this.timeone = e.result;
      this.hourarr = "";
      this.getList();
    },
    change(index) {
      this.current = index;
      this.hourarr = this.datalist[this.current].cate_name;
      this.getList();
    },
    handleCheck1(id) {
      uni.navigateTo({
        url:
          "/pages/detailChange/detailChange?Tdata=" +
          this.form1[0].Tdata +
          "&taskDeviceId=" +
          this.form1[0].id +
          "&tf=true" +
          "&wenziid=" +
          this.form1[0].wenziid +
          "&chuliid=" +
          this.form1[0].chuliid
      });
    },
    handleCheck2() {
      uni.navigateTo({
        url:
          "/pages/detailChange/second?Tdata=" +
          this.form1[1].Tdata +
          "&taskDeviceId=" +
          this.form1[1].id +
          "&tf=true"
      });
    },
    handleCheck3() {
      uni.navigateTo({
        url:
          "/pages/detailChange/third?Tdata=" +
          this.form1[2].Tdata +
          "&taskDeviceId=" +
          this.form1[2].id +
          "&tf=true"
      });
    },
    handleCheck4() {
      uni.navigateTo({
        url:
          "/pages/detailChange/four?Tdata=" +
          this.form1[3].Tdata +
          "&taskDeviceId=" +
          this.form1[3].id +
          "&tf=true"
      });
    },
    handleCheck5() {
      uni.navigateTo({
        url:
          "/pages/detailChange/five?Tdata=" +
          this.form1[4].Tdata +
          "&taskDeviceId=" +
          this.form1[4].id +
          "&tf=true"
      });
    },
    handleCheck6() {
      uni.navigateTo({
        url:
          "/pages/pressureChange/pressureChange?Tdata=" +
          this.form2[0].Tdata +
          "&taskDeviceId=" +
          this.form2[0].id +
          "&tf=true"
      });
    },
    handleCheck7() {
      uni.navigateTo({
        url:
          "/pages/pressureChange/second?Tdata=" +
          this.form2[1].Tdata +
          "&taskDeviceId=" +
          this.form2[1].id +
          "&tf=true"
      });
    },
    handleCheck8() {
      uni.navigateTo({
        url:
          "/pages/pressureChange/third?Tdata=" +
          this.form2[2].Tdata +
          "&taskDeviceId=" +
          this.form2[2].id +
          "&tf=true"
      });
    },
    handleCheck9() {
      uni.navigateTo({
        url:
          "/pages/alongChange/alongChange?Tdata=" +
          this.form3[0].Tdata +
          "&taskDeviceId=" +
          this.form3[0].id +
          "&tf=true"
      });
    },
    handleCheck10() {
      uni.navigateTo({
        url:
          "/pages/alongChange/second?Tdata=" +
          this.form3[1].Tdata +
          "&taskDeviceId=" +
          this.form3[1].id +
          "&tf=true"
      });
    },
    handleCheck11() {
      uni.navigateTo({
        url:
          "/pages/alongChange/third?Tdata=" +
          this.form3[2].Tdata +
          "&taskDeviceId=" +
          this.form3[2].id +
          "&tf=true"
      });
    },
    handleCheck12() {
      uni.navigateTo({
        url:
          "/pages/statusChange/statusChange?Tdata=" +
          this.form4[0].Tdata +
          "&taskDeviceId=" +
          this.form4[0].id +
          "&tf=true"
      });
    },
    handleCheck13() {
      uni.navigateTo({
        url:
          "/pages/statusChange/second?Tdata=" +
          this.form4[1].Tdata +
          "&taskDeviceId=" +
          this.form4[1].id +
          "&tf=true"
      });
    },
    handleCheck14() {
      uni.navigateTo({
        url:
          "/pages/statusChange/four?Tdata=" +
          this.form4[2].Tdata +
          "&taskDeviceId=" +
          this.form4[2].id +
          "&tf=true"
      });
    },
    handleCheck15() {
      uni.navigateTo({
        url:
          "/pages/statusChange/third?Tdata=" +
          this.form4[3].Tdata +
          "&taskDeviceId=" +
          this.form4[3].id +
          "&tf=true"
      });
    }
  }
};
</script>

<style lang="scss" scoped>
uni-view {
  font-size: 14px;
}
.vtable {
  text-align: center;
  width: 100%;
  padding: 10rpx 20rpx 20rpx 20rpx;
}
thead {
  th {
    text-align: center;
  }
}
tbody {
  td {
    text-align: center;
  }
}
.flex {
  display: flex;
  justify-content: center;
}
.text-c {
  th {
    width: 400rpx;
  }
}
.title {
  width: 100%;
  display: flex;
  justify-content: space-between;
  view {
    width: 30%;
  }
  .span {
    height: 100%;
    border: 1px solid #333;
  }
  .text {
    display: flex;
    view {
      flex: 1;
    }
    uni-input {
      height: 100%;
      border-left: 1px solid;
      border-right: 1px solid;
    }
  }
}
.last {
  display: flex;
  view {
    flex: 1;
  }
}
.vtitle {
  font-weight: 600;
}
image {
  width: 50rpx;
  height: 50rpx;
}
.check {
  border-bottom: 2px solid #333;
  width: 105%;
  margin-right: 20px;
}
.titlechild {
  // background-color:rgb(238, 238, 238)
}
.ttitle {
  font-size: 20px;
  font-weight: 600;
  // position: sticky;
  /* #ifdef H5 */
  // top: 44px;
  /* #endif */
  /* #ifndef H5 */
  // top: 0;
  /* #endif */
  // z-index: 999;
  // flex: 1;
  // flex-direction: column;
  // overflow: hidden;
  // background-color: #FFF;
  // border: 1rpx solid bisque
}
.date {
  z-index: 9999;
  position: absolute;
  top: -80rpx;
  right: 10rpx;
  margin-right: 10rpx;
  display: flex;
  align-items: center;
  .image {
    position: absolute;
    width: 28rpx;
    height: 34rpx;
    left: 20rpx;
    // height: 80upx;
  }
  /deep/ .u-size-default {
    padding: 18rpx 24rpx 18rpx 50rpx;
  }
  /deep/ .u-mode-plain-primary {
    border: 1px solid #eee;
    box-shadow: 0 0 20rpx #eee;
    border-radius: 16rpx;
    color: #989898;
  }
}
.ttitle1 {
  position: fixed;
  bottom: 0rpx;
}
.title2 {
  height: calc(100% - 140upx);
}
.k-line {
  display: lnline-block;
  width: 15px;
  height: 15px;
  border-radius: 15px;
  margin-top: 20px;
}
@keyframes k-loadingA {
  50% {
  }
}
.innerContain {
  height: 100%;
  text-align: center;
  position: relative;
  background-color: white;
}
.top-content {
  height: 360upx;
  background: linear-gradient(to left, #1040be, #026dff);
}
.top {
  height: calc(100% - 170rpx);
  margin: 0rpx;
  overflow-y: auto;
  position: absolute;
  background-color: white;
  padding: 50rpx;
  width: 100%;
  // box-shadow: 4rpx 4rpx 20rpx #e5e1e1;
  top: 150rpx;
  border-radius: 40rpx 40rpx 0 0;
  .card {
    // background-color: white;
    border: 1px solid #eee;
    padding: 20rpx 20rpx;
    border-radius: 25rpx;
    box-shadow: 0 0 20rpx #eee;
    margin-bottom: 20rpx;
  }
}
/deep/ .uni-view {
  font-size: 0px;
}
.titlechild {
  margin-top: -10rpx;
}
/deep/ .u-line-1 {
  height: 60rpx !important;
}
.border {
  margin-left: 20rpx;
  padding: 4rpx;
  // box-shadow: 0 0 20rpx #eee;
  border: 1px solid white;
  border-radius: 16rpx;
  color: white;
}
/deep/ .video-del {
  display: none;
}
</style>